home *** CD-ROM | disk | FTP | other *** search
/ SunSoft Catalyst CDWARE 1996 May to August / Catalyst CDWARE 1996 May to August.iso / .products / Hyperion / _install / install_unbundled next >
Text File  |  1996-02-28  |  3KB  |  124 lines

  1. #! /bin/sh
  2. #
  3. #    Installation shell script for WorkMan -> Catalyst CDware
  4. #
  5. #     Usage: install_unbundled -m<mountpoint> -p<productpath>
  6. #
  7. #    Created:     June 12, 1991
  8. #    Last Revised:     May 19, 1994
  9. #
  10. #    Use this installation script to install WilView from Catalyst CDware
  11. #
  12. #
  13. #    For technical support, please call.
  14.  
  15. #
  16. #    get command line parameters
  17. #
  18. MOUNT_PARM=$1
  19. PRODUCT_PARM=$2
  20. #    set PRODUCT_SIZE to the size of your product in kbytes     
  21. PRODUCT_SIZE=1000
  22.  
  23. #
  24. #    get complete paths
  25. #
  26. MOUNT_PATH=`echo $MOUNT_PARM | egrep -e -m | sed -e 's/-m//'`
  27. PRODUCT_DIR=`echo $PRODUCT_PARM | egrep -e -p | sed -e 's/-p//'`
  28. PRODUCT_PATH=$MOUNT_PATH/$PRODUCT_DIR
  29.  
  30. #
  31. #    get location of installation directory 
  32. ##
  33. echo "Please enter the absoulte path name of the directory structure in which"
  34. echo "you would like to install WorkMan. "
  35. echo
  36. echo "Installation directory: "
  37. read INSTALL_DIR
  38.  
  39. #
  40. #    verify the installation directory exists and is a directory
  41. #
  42. if [ ! -d "$INSTALL_DIR" ]
  43. then
  44.     echo "Creating $INSTALL_DIR ..."
  45.     mkdir $INSTALL_DIR
  46.     if [ ! -d "$INSTALL_DIR" ]
  47.     then
  48.         echo
  49.         echo
  50.         echo "Could not create the installation directory."
  51.         echo
  52.         echo "Exiting the installation script."
  53.         exit 1
  54.     fi
  55. fi
  56.  
  57. #
  58. #    verify write permission for the installation directory
  59. #
  60. if [ ! -w "$INSTALL_DIR" ]
  61. then
  62.     echo
  63.     echo
  64.     echo "You do not have write permission for the installation directory: "
  65.     echo $INSTALL_DIR
  66.     echo
  67.         echo
  68.     echo "Exiting the installation script."
  69.     exit 1
  70. fi
  71.  
  72. #
  73. #    verify free disk space
  74. #
  75. echo    
  76. echo    "Verifying free disk space..."
  77. FREE_SPACE=0
  78. df=/tmp/FREE.$$
  79. /usr/bin/df $INSTALL_DIR | sed /kbytes/d | sed -e '3,$d' | sed -e '1,$s/  */ /g' > $df
  80.  
  81. case `/usr/bin/wc -l $df | sed -e 's/^ *//' | cut -f1 -d" " ` in
  82.     1) FREE_SPACE=`cat $df | cut -f4 -d" "` ;; 
  83.     2) FREE_SPACE=`cat $df | sed 1d | sed 's/^ *//' | cut -f3 -d" "` ;; 
  84. esac
  85.  
  86. if [ -n $FREE_SPACE ]
  87. then
  88.     if [ $FREE_SPACE -lt $PRODUCT_SIZE ]
  89.     then
  90.         echo
  91.         echo
  92.         echo "The WorkMan installation requires $PRODUCT_SIZE kbytes of"
  93.         echo "free disk space. There is only $FREE_SPACE kbytes of free" 
  94.         echo "disk space in the selected filesystem.  Please free up some"
  95.         echo "disk space and try this installation again."
  96.         echo
  97.         echo "Exiting the installation script."
  98.         exit 1
  99.     fi
  100. fi
  101. /bin/rm $df 2>/dev/null
  102.  
  103. #
  104. #    copy binaries to installation directory
  105. #
  106. cp -r $PRODUCT_PATH/src $INSTALL_DIR
  107.  
  108. echo
  109. echo
  110. echo "The installation was a success."
  111. echo
  112. echo "To load WorkMan, do the following: "
  113. echo
  114. echo "1. Exit the Catalyst CDware Interface."
  115. echo "2. Change directories to "$INSTALL_DIR"/src "
  116. echo "3. If you are running Solaris 2.x SPARC you can "
  117. echo "   just run workman.S2. Otherwise you may need to run make."
  118. echo
  119. echo        
  120. sleep 10
  121.  
  122. exit 0
  123.  
  124.